const { api } = getApp();
Component({

    // 属性列表
    properties: {
        type: { type: Number },     // 0-多模式 1-单模式
        info: { type: Object },     // 课题信息
        state: { type: Number },    // 小组报名状态
    },

    // 初始数据
    data: {
        topic_state: ''
    },

    // 生命周期
    lifetimes: {
        attached() {
            let { state } = this.data;
            let topic_state;
            switch (state) {
                case 0: topic_state = '待审核'; break;
                case 1: topic_state = '审核通过'; break;
                case 2: topic_state = '已驳回'; break;
            }
            this.setData({ topic_state });
        },
    },

    // 方法列表
    methods: {
        jump() {
            api.navigateTo(`/pages/class/details/index?id=${this.data.info.id}`)
        }
    },

})